<?php

namespace app\api\model;

use think\Model;
use traits\model\SoftDelete;

class TermReports extends Model
{
    use SoftDelete;
    protected $deleteTime = 'deletetime';
    protected $hidden = ['deletetime', 'createtime', 'updatetime'];

    public static function getByStudent($student_id, $year, $type)
    {
        return self::where('student_id', $student_id)->where('year', intval($year))->where('type', $type)->find();
    }
}
